package restaurant.selector.database;

import java.sql.Date;
import java.util.ArrayList;
import java.util.List;

import restaurant.selector.Restaurant;
import restaurant.selector.User;

public class FileWorker implements DatabaseWorker {

	@Override
	public Restaurant getRestaurantById(int id) {

		return new Restaurant(1, Restaurant.WEATHER_ALL, "LaRoma's", new Date(0),
				new Date(Integer.MAX_VALUE), new Date(0), new Date(Integer.MAX_VALUE),
				3, false);
	}

	@Override
	public Restaurant getRestaurantByName(String name) {

		return new Restaurant(1, Restaurant.WEATHER_ALL, "LaRoma's", new Date(0),
				new Date(Integer.MAX_VALUE), new Date(0), new Date(Integer.MAX_VALUE),
				3, false);
	}

	@Override
	public List<Restaurant> getRestaurants() {

		ArrayList<Restaurant> restaurants = new ArrayList<Restaurant>();
		restaurants.add(new Restaurant(1, Restaurant.WEATHER_ALL, "LaRoma's", new Date(0),
				new Date(Integer.MAX_VALUE), new Date(0), new Date(Integer.MAX_VALUE),
				3, false));
		restaurants.add(new Restaurant(2, Restaurant.WEATHER_ALL, "Greasy Tony's", new Date(0),
				new Date(Integer.MAX_VALUE), new Date(0), new Date(Integer.MAX_VALUE),
				4, true));
		restaurants.add(new Restaurant(3, Restaurant.WEATHER_ALL, "Karam's", new Date(0),
				new Date(Integer.MAX_VALUE), new Date(0), new Date(Integer.MAX_VALUE),
				12, true));
		return restaurants;
	}

	@Override
	public User getUserById(int id) {
		return new User(1, "User 1");
	}

	@Override
	public User getUserByName(String name) {
		return new User(1, "User 1");
	}

	@Override
	public List<User> getUsers() {
		ArrayList<User> users = new ArrayList<User>();

		users.add(new User(1, "User 1"));
		users.add(new User(2, "User 2"));
		
		return users;
	}

	@Override
	public void addRestaurant(String name, boolean quick, int distance) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void addUser(String name) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void deleteRestaurant(Restaurant r) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void deleteUser(User u) {
		// TODO Auto-generated method stub
		
	}

}
